import request from "@/utils/request";

// 分页、条件、模糊查询图书信息
export function getList(data) {
  return request({
    url: "/book/page",
    method: "post",
    data,
  });
}

// 更新图书信息
export function updateBook(data) {
  return request({
    url: "/book/update",
    method: "put",
    data,
  });
}

// 删除图书
export function deleteBook(ids) {
  return request({
    url: "/book/delete",
    method: "delete",
    data: ids,
  });
}

// 新增图书
export function addBook(book) {
  return request({
    url: "/book/add",
    method: "post",
    data: book,
  });
}

// 查询所有
export function getAllBooks() {
  return request({
    url: "/book/all",
    method: "get",
  });
}
